#ifndef PORT_H
#define PORT_H

#include "lvgl.h"
#include "TFT_eSPI.h"
#include "SPI.h"
#include <Wire.h>
#include <stdbool.h>

#define MY_DISP_HOR_RES 320
#define MY_DISP_VER_RES 240

extern uint32_t currentBacklight;

/* LV_PORT */
void lv_port_disp_init(void);
void lv_port_fs_init(void);

/* Backlight */
void Backlight_Init();
uint32_t Backlight_GetValue();
void Backlight_SetValue(int32_t val);
void Backlight_ForceLit(bool en);
void Backlight_SetGradual(uint32_t target, uint16_t time);

#endif